package com.eve.controller;

import java.security.Principal;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
/**
 * This controller is used to provide functionality for the login page.
 * 
 * @author Mularien
 */
@Controller
public class LoginLogoutController extends BaseController{
	@RequestMapping(value="/welcome", method = RequestMethod.GET)
	public String printWelcome() {
		return "/internal/home";
	}
	@RequestMapping(value="/loginfailed", method = RequestMethod.GET)
	public String loginerror(ModelMap model) {
		model.addAttribute("error", "true");
		model.addAttribute("message", "Incorrect Username or Password");
		return "/index";
 
	}
	@RequestMapping(value="/index", method = RequestMethod.GET)
	public String login(ModelMap model) {
		return "/index";
 
	}
 
	
 
	@RequestMapping(value="/logout", method = RequestMethod.GET)
	public String logout(ModelMap model) {
 
		return "/index";
 
	}
 
}